package cn.xz.gobang.bean

import cn.xz.gobang.util.SessionUtils


object CommonLib {

    lateinit var mData: RoomSingle

    //服务器IP
    private const val APP_IP = "http://192.168.140.78"
    //private const val APP_IP = "https://560n738l87.zicp.fun"

    //服务器端口号
    private const val APP_CODE = "9199/"
    //private const val APP_CODE = "443/"

    const val getMUrl = "$APP_IP:$APP_CODE"

    //我的IP
    var UserIP = "网络异常"

    //已邀请对方的ip合集
    lateinit var mFriends: ArrayList<String>

    //界面跳转时需要携带的标识符
    const val JUMP_TYPE = "jump_type"

    //本地缓存的文件名
    const val JC_SP_KEY = "go_bang_key"

    //意见反馈txt，名称
    const val FeedBack = "feedback"

    //全部用户数据
    const val GOBANG_USER = "gobang_user"

    //单人对局房间列表
    const val SINGLE = "single"

    //多人对局房间列表
    const val DOUBLE = "double"

    //具体房间前缀 - 单人
    const val SINGLE_ROOM = "room_single_"

    //具体房间前缀 - 多人
    const val DOUBLE_ROOM = "room_double_"

    //玩法说明
    const val PLAYING = "playing"

    //获取对方是否在线
    const val GET_TEST = "/test"

    //获取游戏数据
    const val GET_ALL_USER = "/game/getTxt"

    //新建/修改txt内容
    const val UpData_User_Data = "game/saveOrUpdateTxt"

    //删除文件
    const val DELETE_TXT = "game/deleteTxt"

    //接收到对方邀请
    const val GET_USER_DATA = "GET_USER_DATA"

    //房主开始游戏
    const val OPEN_PLAY = "OPEN_PLAY"

    //获取当前用户ID
    val getUserID = SessionUtils.getString(SessionUtils.USER_ID,"")

}